
var Game = require('Game');
cc.Class({
    extends: cc.Component,

    properties: {
     titleLab:cc.Label,
     musicLab:cc.Label,
     effectLab:cc.Label,

     effect: cc.Toggle ,
     music: cc.Toggle ,
     musicFlag:true,
     effectFlag:true,
    },

   
    onLoad: function () {
        this.titleLab.string=Game.instance.LL.t('label.Setting');
        
        this.musicLab.string=Game.instance.LL.t('label.BackgroundMusic');
        
        this.effectLab.string=Game.instance.LL.t('label.SoundEffects');
    
     },
   
    musicSetting(){
     this.musicFlag=!this.musicFlag;
     cc.log("===========musicSetting="+this.musicFlag);  
     Game.instance.audioMng.musicSetting(this.musicFlag);
     

    },
    effectSetting(){
     this.effectFlag=!this.effectFlag;
     cc.log("===========effectSetting="+this.effectFlag);  
     Game.instance.audioMng.effectSetting(this.effectFlag);
    },
 
     
   
});
